package com.ddz.shortcut

import org.junit.Test

import org.junit.Assert.*
import kotlin.time.ExperimentalTime
import kotlin.time.measureTime

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @ExperimentalTime
    @Test
    fun addition_isCorrect() {
        val regex = Regex("(?=^.{2,4}\$)(?=.*跳过.*)|(?=.*跳过.*)(?=.*[0-9].*)")
//        val result = "跳过".matches(Regex(regex))
        val time = measureTime {
            println(regex.find("跳过")?.groups?.size?:0 > 0)
            println(regex.find("跳过123")?.groups?.size?:0 > 0)
            println(regex.find("跳过是否鼎折覆餗的")?.groups?.size?:0 > 0)
            println(regex.find("123跳过123")?.groups?.size?:0 > 0)
            println(regex.find("123跳过")?.groups?.size?:0 > 0)
        }
        println(time)
    }

}